package com.yunheone.view;

import java.util.Scanner;

/**
 * Created by Administrator on 2017/8/9 0009.
 */
public class Teacher {
    public static int teacherView(){
        System.out.println ("***************学员信息管理系统************");
        System.out.println ("1.学员管理");
        System.out.println ("2.密码管理");
        System.out.println ("3.退出系统");
        Scanner input=new Scanner ( System.in );
        System.out.print ("请输入操作序号：");
        try{
            int i=input.nextInt ();
            if (i>3||i<1){
                throw new Exception("操作序号未识别,请重新输入");
            }
            return i;
        }catch (Exception e){
            String message = e.getMessage ();
            System.out.println (message!=null ? message : "输入不合法,请重新输入");
            return  teacherView ();
        }
    }
}
